package cn.school.notice.service;

import cn.school.notice.entity.SchoolNotice;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public interface SchoolNoticeService {


    /**
     * 新增校园通知管理表
     * @param schoolNotice
     * @return
     */
    int insert(SchoolNotice schoolNotice);


    /**
     * 删除校园通知管理表
     */
    int deleteNotice(SchoolNotice schoolNotice);

    /**
     * 修改校园通知管理表
     */
    int update(SchoolNotice schoolNotice);

    /**
     * 批量更新通知
     * @param list
     * @return
     */
    int batchUpdateNotice(List<SchoolNotice> list);

    /**
     * 查询校园通知管理表
     */

    SchoolNotice selectById(Long id);


    /**
     * 分页查空间信息
     * @param schoolNotice
     * @return
     */
    IPage<SchoolNotice> findNoticePageList(SchoolNotice schoolNotice);

    /**
     * 发送通知到用户
     */
    void sendNoticeToUser(SchoolNotice schoolNotice);

    /**
     * 分页查询个人的通知信息
     * @param schoolNotice
     * @return
     */
    IPage<SchoolNotice> findSchoolNoticeByUserPageList(SchoolNotice schoolNotice);

    /**
     * 更新通知读取状态
     * @param schoolNotice
     * @return
     */
    int readyNotice(SchoolNotice schoolNotice);


}
